import 'babel-polyfill';
import Vue from 'vue';
import App from './App';
import router from './router';
import vueResource from 'vue-resource';
import fastclick from 'fastclick';
import filter from 'common/js/filter';
import VueLazyload from 'vue-lazyload';
Vue.use(VueLazyload, {
  loading: require('common/image/default.png')
});

// 移动端三百毫秒延迟
fastclick.attach(document.body);
Object.keys(filter).forEach((attr) => {
  Vue.filter(attr, filter[attr]);
});

Vue.prototype.Event = new Vue();

// vueResource
Vue.use(vueResource);

import 'common/stylus/index.styl';
/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  render: h => h(App)
});
